IF EXISTS (SELECT * FROM SYSOBJECTS WHERE ID = OBJECT_ID('HottestPaintingSelectAll') AND sysstat & 0xf = 4)
    DROP PROCEDURE HottestPaintingSelectAll
GO
CREATE PROCEDURE HottestPaintingSelectAll
AS
BEGIN
	SET NOCOUNT ON
	select 
		 p.painting_id AS PaintingId
		,p.painting_number AS PaintingNumber
		,p.image_url AS ImageUrl
		,p.Title
		,p.Description
	from
	hottest_painting hp
		inner join painting p on hp.painting_id=p.painting_id
	
END
GO
